details widget name

Stubs

Chapter details

The stubs component is responsible for acquiring and providing the content for the list widget renderer in Atlas. Moreover, all backend operations related to grouping, sorting, paging and filtering of the content items are performed in this component. The stubs component consists of the plugins starting with com.tetracom.atlas.stubs . The key service in the component is com.tetracom.atlas.stubs.api.IStubsService. It includes methods for retrieving content and using various ordering and filtering information. Some of these methods are used to return:

  • unordered content items – without sorting, paging or grouping

  • paged content items

  • sorted content items

  • grouped content items

  • sorted and paged content items

  • sorted and grouped content items

  • grouped and paged content items

  • fully ordered content items – sorted, grouped and paged

  • alternative content items, such as search results and text mining similar items

Note: All of the methods mentioned above use the widget's datasource or selection (if such exists) for filtering of the results. Also, these methods include a content type restriction – a list of types, which are allowed for the specific list widget.

The other important service in the component is com.tetracom.atlas.stubs.api.IStubsDAO and its implementation com.tetracom.atlas.stubs.storage.StubsDAO. The latter is the place where the business objects, which participate in the stubs request are transformed into sql queries. This is done in the following way:

  • the datasources are transformed in a WHERE sql statement, which includes all clauses of the datasource

  • if the widget's content is restricted by a selection, the initial results are restrained to the selection's content.

  • the sorting entity is converted to an ORDER BY clause using the properties defined in the business object.

  • the grouping entity is converted in a GROUP BY clause using the selected grouping properties.

  • the paging entity is used to retrieve only the required content items for a given page. This is done by using the LIMIT and OFFSET sql operators in combination with the data from the paging entity.

To summarize, this is the component, which takes the list widget related business objects defined in the content management part of the system and converts them to an SQL query. Afterwards, it processes the results and returns the content items, which match the request for the list widget. In this way, the component acts as a bridge between the configuration part of the system and iViewer.